#!/usr/bin/env python3
# -*- coding: utf-8 -*-

class Solution:
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        if x < 0:
            return False

        reversed = list(str(x))
        reversed.reverse()
        return int(''.join(reversed)) == x


s = Solution()
print(s.isPalindrome(121))
print(s.isPalindrome(-121))
print(s.isPalindrome(-10))

